<template>
  <div class="develop" @click="setDevCount"></div>
</template>

<script>
const {ipcRenderer}=require('electron')
export default {
  name: "devTool",
  data(){
    return{
      devCount:0,
    }
  },
  methods:{
    setDevCount(){
      this.devCount++;
      if(this.devCount===5){
       let r=confirm('确定打开控制台')
        if(r){
          ipcRenderer.send('open-devtools')
          this.devCount=0
        }else{
          this.devCount=0
        }
      }
    }
  }
}
</script>

<style lang="scss">
.develop{
  position: absolute;
  left: 0;
  bottom: 0;
  width: 300px;
  height: 300px;
}
</style>